package com.totem.base.enums;

import lombok.Getter;

import java.util.Objects;

@Getter
public enum ProductTypeEnum {
    VIRTUAL_PRODUCT("VIRTUAL_PRODUCT");

    private final String code;

    ProductTypeEnum(String code){
        this.code = code;
    }

    public static ProductTypeEnum byCode(String code) {
        for (ProductTypeEnum e: ProductTypeEnum.values()) {
            if (e.code.equalsIgnoreCase(code)) {
                return e;
            }
        }
        return null;
    }
}
